package org.example.j1107nm2;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user1")
@RestController
public class Test {
    //1.下面的这个就是建立连接的过程
    //   这个时候直接试用期试试看不到这个效果的，报错404
    @RequestMapping(value="/hello",method= RequestMethod.GET)
    public String hello(){
        return "hello";
    }

    @RequestMapping("/r1")
    public String r1(String name){
        return "接收到的参数"+name;
    }
}
